cleanup code which is causing Wsign-compare warning
Merge pull request #235 from Chilledheart/patch-9

cleanup code which is causing Wsign-compare warning