Add to onpopstate listener