while(Serial.available()==0) {} loop falls through

I'm 99,9% sure that you problem is that you have a pause "to copy numbers",as you call it, so you type something to continue and that something stays in the buffer as you don't empty it and thus your code just zooms thru the next available() calls.