Lock screen fixes and threading fixes