Refine some hash code