fix bounds on remove and add test