Fix remove rule bug.