bot logic fixed