Fix remove functionality