fixed flash when pop state in safari