Fixed remove method

Fixed a bug in the remove method