Handle the case where we are force-stopped while restarting

This fixes errors when killing the bot while it's sleeping 1 second while restarting.