Can someone explain why my next still decrements before incrementing?

Why does my next(or prev) button decrements before it actually increments the other way on this color slide show? I can’t figure it out and it’s driving me crazy.

Thanks!
-Silas

2 posts were merged into an existing topic: How to reset index back to zero