Fix unlocking being in block