There is nothing wrong with the code at the 1st and 3rd. The problem must be elsewhere.