ImageGallery
some code fixed