my bad, I didn't realize what line you were actually commenting on - good catch, the increment should be outside the conditional...