fixed unexpected EOF