Closed TextWriter Exception

Clicking twice on Unbind throws exception of closed TextWriter
--
ObjectDisposedException was unhandled
Cannot write to a closed TextWriter.
Merge remote-tracking branch 'origin/jvanderbiest_bugfix2' into jvanderbiest_bugfix1