Fix some problems with history and page title.