fixed bug with dragging. This closes #61