better error messages for some parsing errors