Bug 1061324 follow up - Intermittent fix and app closing hardening.