Fix 'terminal history off' crasher