corrected dragging in edit mode