minor gallery.js change