Bug fix: avoid double removal.