Fix sign for loop counter.