Fix/cherry-pic #47, possibly #58 - clear all output buffers on quit