Improved locking behavior