fixed history back/forward bug with pushState vs replaceState.