Restore the terminal when melt exits abnormally