fix core dump