Fix error with Edits and JSON parse error handling.

If the string result could not be JSON parsed, the callback would not get called correctly.

Also, edit was not getting called correctly.