fix bug for JSON's with n