Fixed AI initialization problem