fix for gallery