automate resetting termios