Fixed small unlock detection bug