Fixed js to respect X's O's