Change reset to sync, add setOptionsIndices invocation to anonymous function