hack to prevent the core dump during destructor