Make the bot quit properly