Making the gallery captions work better.