Fix drawing of images