fix function of convert to HTML