Fix broken dom nesting