Fixed the gallery plugin