Work around signed / unsigned mismatch
Merge pull request #3889 from ktf/fix-type-mismatch

L1: Work around signed / unsigned mismatch