Fixed bugs with text and html validation