Added conditions to target imports to avoid warnings.