Fixed signed and unsigned comparison warnings