Fixed bug in DB AI choosing