Fixed onhashchange handling