Fixed UnicodeDecodeError on bad UTF-8 sequences in received JSON