fix signed/unsigned mismatch warning