fix tag nesting