fix compute result in NaN