fixes for gallery