bug fix: using @h.clear instead of h = {} to prevent losing a method.