catch stack overflows (when html is nested...?)