Tweaks to pushState & popState