Fix click-dragging behaviour