Can't set attributes of object class