popstate issue needs to be fixed