prevent NaN percision issue