fix duplicate error messages