fix some template issues in hash