Fix an issue which gives gibberish output when gzip is enabled.
Merge pull request #1158 from uzyn/bugfix/handleFatalError

Fix an issue which gives gibberish error message when gzip is enabled.