Fix remove blocks bug