Fixed slider out of index bug