fixed signed/unsigned comparison warning