fixing error messages