Move removal out of if block.