fix drag and drawing.