Fixed some warnings 

comparison between signed and unsigned