Repair search&replace functions