fixed warning for signed vs unsigned comparison