Fixing bugs with remove and update