Fix bug with restore last provider.