Fix possible crash when playing back AI moves