fixed error when no hash is given