fix gallery display for other pages