Fix segfault after computer resigns