Fix #4690
Fix #4691
Add get_hash function to utils
Fix #4692
Use get_hash from utils