fix bad destructuring