FIXED: segv at exit