Fixed a crash on startup when there's no history.