Fix writeXodAsJson error