get_attributes method fixed