prototype fixes
signed/unsigned mismatch correction