fixed bug in setting the image at the wrong time