Fix lock calling