corrected a counting error.

I thought I was counting from -1 when I was actually counting from 0 so a
check later in the code was wrong.
I also cleaned up the comments a little.