parsing bug fixes