fix signed comparison