More issues with NaN fixed