Fix problem with gallery display.