fixing bug with popstate - we shouldn't pushstate if it came from a popstate event