fixed core dump issue