resolve unexpected end of file