correct prototypes to fix signed/unsigned mismatch