fixed lock function
updates