fix unexpected end of file error