improve pushstate to handle location changed