fix generating invallid html