Trying to fix annoying quitting problem.