fixed issue with initial popstate on firefox