Save child contexts when application quits.
Fix crash in pref debug controller.