yet another fix for gallery