Fixed a remove function