bug fix for dragging controls