Fix remove-pieces logic