Fix pushstate code