fixing editdrag

plugging memory leak