Fixed bug which prevented 500 response on exception