compo to json and another fix