* fixed a segfault at exit