fix: 'resource' leak