better condition for hashchange check