History order fix

Contains two commits. One that @veskuh to the new-browser-ui and one that fixes unit tests.