fixed bug in remove