Fixed NaN issue for remaining pairs