fix unsigned arithmetic bug in previous change
3 files changed