Fixing malformed JSON