Fixed bug with draw.createImage