fix media gallery