Put the terminal back to its initial state