fixed add_child bug