Fix crash at CTRL_C