Fixing some issues in parsing of error messages