fixed: lock function does not actually lock anything