'Fix' for the segfault on exit