Fix lock destruction/unlock inversion