Fixed major bugs in brc-json.tool