fix warning: comparison between signed and unsigned