properly defend against hash dos