fix crashing during auto-update process/