bug fixes, better parsing error messages