fixed bug with pop state on embedded apps