fix the gallery display