Fixed reordering of history if the browser instance is closed (#31).