Fix big memory leak