fix setCurrentIndex