Fix shadowing hash var warning

Fix the shadowing var `hash` to avoid warning.