Fixing narrowing warnings.