fix double images problem when Smooth Gallery is terminated due to few slides