fixed the isFirst function to really check if the slide is the first item, not just 0