Replaced a try-catch in hashRing