fixed bug in autounlock