end of input fix