fixing error message issues