fixed a signed/unsigned mismatch warning