corerct badly formed tags