Added check for parse errors.