fixed history stack issues, still have to work on page refresh