fix popstate firing on page load in some browsers