fix destructuring in apply-global-attributes