fix JSON producing script