fix merge(?) error in JS