Fixing the display of the gallery