Fixed issue with NaN