fixing createHTMLImage