fixing removal bug