Fixing error messages which mention the wrong type.