Explicity check for -1 return values instead of < 0.