Repair scripts in the same file