Add script locking
also, fix 'typo'