fix dragging and unflip