Flush before waiting for new input, not after