bugfix variable terminal_type