fix JSON creation