Added debug printout for ai