fix the image gallery numbers not incrementing