fix signed/unsigned comparison compiler warning