Try this instead if you want to sit in one place waiting for a byte to come in:
while (Serial.available() == 0) ;