Fix set_object bug