Added terminal settings, recursion checks