Minor bug fix for 2-step JS aggregation