Fixed bug in remove