Get rid of some html errors from generated html