Fixes drag-end bug.