Slideshow.changeSlide() executes in Preview but not in Live

I simplified it as you suggsted. Changed the order in the slideshow to start with Sunday. This way day(0) should be the same as slide(0). The preview function in the editor shows the right day. The live published version keeps showing Monday…

// Show correct Slide for Farmables ---------------------

var TodaySlide = new Date();
$w( “#slideshow1” ).changeSlide(TodaySlide.getDay());