fixed add/remove bug