fixed a bug that was losing children that were kept open when their parents closed (malformed html)