Fixing target duplication on add/remove function