fix infinite streaming to work and stop at any key press