add path var
memory leak fix