added code to gracefully drop out when problematic hashes are encountered