fixed some issues in "X-Responded-JSON" header handling logic