fixed NaN hopefully