Fix bug with history loading

Fixed bug introduced in fea487601