fixed the html issues to some extent