Tried to fix the gallery js.