added checks for unlock