Fix some type conversion warnings.