fix EOFError