fix bnode creation for JS