fix error with multiple drag

In my case, this solution works fine.