ai null reference fix
Merge pull request #174 from duiker2/master

ai null reference fix