attempt to solve mem leak