fix bug of image loading