#339 Proper fix for current index not being updated