fixes for gallery 4 theme