Fixes from 1a2e3ab

Test Plan:
Used the editor and saw that toJSON() gave the right thing.