Fix remove algorithm usage