fix signed/unsigned mismatch