Merge "Fix a bug where a provider could be never released."