fixed some dragging bugs