fix (hopefully?) memory leak