Also fix build. Only warnings about comparisons between signed and unsigned integers needed to be fixed.