fix signed/unsigned comparison warning