Fix segmentation fault on resolver shutdown