Removed compiler warnings compare signed and unsigned