fix up parsing errors