made tgdi memory-safe(r); fixed l_add_path to redraw old path