fix edge cases in var destructuring