fixing gallery theme 3