fix bug in new leveled lock fcn