Fix the segmentation fault at exit-time.