Added more precise error messages.