Bugfix with incorrect content-type on error message