Updated GalleryViewHelper to order thumbnails correctly