fixed a few more bugs in remove