gallery format fix