fix two dragging bugs