Fix the hash val func