check for currentIndex fails when zero (boolean)