improvement of locking behavious