fix terminal_dir