fixed the titlecase failure.
All working except the self-closing tag corruption