ensure getHash return value is consistent with location.hash