cleanup after search/replace