Fix bug in unlocking the profile