Gallery display fix