fixed script locking