restore NaN history entries (@djuretic thanks!)