fixed remove functionality