hack for terminal mode