Fix lock type set bug.