Fix use of history without HistEvent, causing segfaults