Fixed JSON error responses to internal HTTP output.
Fixed a typo from an earlier commit.