fix signed unsigned comparison