Fixed NaN issue on index when no data