resolve a problem when shutting down an overlay service during tests