Custom Slider Counter Issues

Hey all! I’ve built a site for Coursello that has a CMS Slider thanks to Finsweet Attributes. I’ve also implemented some custom code to have a slider counter that displays current slide number and total number of slides.
However there’s an odd issue when loading the Explore Courses page. The featured courses slider counter will sometimes show 01/01 (and not change on click) instead of showing 01/05 and counting thru slides. This is odd mostly because if you refresh the page once or twice it seems to fix itself. (And if you keep refreshing again and again, you will eventually land at the error 01/01 again.) I am using some custom code found on this Webflow Forum post to calculate/display slide numbers along with Finsweet CMS Slider attributes to pull CMS data from a collection. I have gone through the forum post pretty thoroughly and I think I’ve exhausted all of my ideas on fixing this so hopefully someone is able to offer some guidance! It looks like some other people on that forum post using Finsweet have possibly run into the same issue.

Thanks in advance!!


Here is my site Read-Only: [LINK]
(how to share your site Read-Only link)