fixing initial load popstate