Fixed gallery layout formatting