Work on #218: make sure to initialize history to prevent null pointer.