Add missing lock releases