Fix JS SDK bugs with node merge