Improved consistency of error messages