minor lock code cleanups