fixed error when url has no hash