fix error instantiating close wrapper