fix bug with hashchange initial