fixed signed/unsigned comparison