fixed the image not displaying bug