Add type conversions to fix compiler warnings
Merge pull request #2 from petere/warning-fixes

Add type conversions to fix compiler warnings