Fix error message raised when attribute is not found