fixed AttributeError