Fixed hasattr