improve some error messages