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

At the last line in the monitor "F1 = 435.00". you can go for a cup of coffee and when you return that line will
still be the last line in the monitor. Hit 0 (zero) or any other char and then hit enter. That will drive the
while loop false and then move on until the next while "pause" loop.

Well what do you think happens to your 0+enter? Your char '0' stays in the buffer because you don't read it out. So the next call to availabel() returns a positive number and thus you don't wait.

If you want your code to work, just ensure you read everything out of the input buffer once available() said something was there. Once the serial buffer is empty, then proceed.