hopefully fix NaN issue