fix EOFException