Fixed a bug where the bot would not retry if an error ocurred