fix popstate fail