* fixed crash at exit