Fix for crash on real devices. We need to reset quit flag before we start new thread