fix the image display bug