improved locking, added the always feature