Silence some warnings.

Just added some casts to silence some signed comparison warnings.