changed JSON history format since JSON doesn't support NaN.