fix signed/unsigned compare