fixed popup image gallery layout bug.