popstate fix