Fixed some NaN issue temporarily.