fix missing Close in test