inline gallery fix