added missing Close()