Fix dragging bug