fix reset on index