fix error when the url don't have hash