Fix index to not display result if it is NaN