fixed EOF error while parsing