Restored correct sorting of history pages