fixed segfault when AI plays first