Fixes signedness issues.