Fixed typo in image loop