Fix type conversions.