fixing up some bugs with dragging