Modified how unlock in KeyHandler works