fix duplicate type error messages