Fixed error in Exception handler

This would cause error pages to be sent without adequate headers...