Fix for #16
State is saved for current item index