fixed bug that arc is NaN