fixed some unsigned int issues

Good catch - I used the same for loop and reversed it - but didn't catch that it won't work for decrement. :(