Fix showing EOF error when input was empty