Fixed code for restarting after auto-update