Fixed the gallery box to resize for the image that it is containing.