fix some bugs in add_interaction and reconnect