Warnings--

Fixes some cases where clang complains about loss of integer precision