changes to support title change on pushstate and popstate