Make the remove function works