fix error in slider index