Migrate retain to filter.