restore script guard