fixed index list problems in gallery image