leak

added missing `var` to `onClose`.