Fix mtjson asserts and what is written