Fixed Behavior id setting in to_obj()