Is this due to the newline('\0') being left in the buffer after the user enters in the int?