Fixed bug for image display