fixed provider close in test