solved(?) memory leak