bug hunting in ai_ch_coord.c