make parser more robust