Improved some error messages.