fix webkit popstate bug