fix leak check problem with JSON