fix a bug in add_interaction