Fix remove entry bug