Added more checks of html