extern api json creation bug fix