Fix crash due to emitting signal from wrong thread
Allow toggling output pane