hmmm that's an interesting one.
ok. lets try this:
1. Open QB, goto PAGE M (midi) and deselect everything then quit. the settings are saved on exit, so you have cleared them now
2. open QB goto PAGE M and select your midi stuff, with autostart and Midi on - so it will restart correctly. then quit. you now have new midi settings :)
3. QB does have an 'all notes off' command: PST or PSTOP. so when your Karma goes nuts. goto the command line enter PST and it should stop!
Let me know how you get on with this please - if it all works or doesn't :)