Fix a warning

warning: comparison between signed and unsigned integer expressions
Merge available fixes