Minor fix to AnsiTerminal.close