Fixing unlock authorization bug