fix initial popstate bug in chrome