FIxed memory leak