Fixed compiler warnings about comparisons of integers of different signs (not full fix yet, though)