Fixes #1025 (NaN in history tab)