Change lock value
Fix compilation warning.
Don't use lock for application code.