fixed bug with remove method