end-of-input exit fixed