Got rid of redundant lock operation.