fix crash on battle leave with bots (wrong delete order)