Add better pushState handling