Revert and remove str conversion in get_hash