Fixed a bug introduced by 8c999e2 that did not end output buffering on E...

Fixed a bug introduced by 8c999e2 that did not end output buffering on Exceptions (causing output printing to be delayed).