fix crash on autoupdate exit