Fixed sort order of gallery.