Fix output.json bug