Remove this line! LockScreen.locked is updated by LockScreen, you shouldn't update the value for LockScreen.