removed a number of warning about int/unsigned comparison