Fixed AttributeError