fix broken error messages