avoiding state change when dragging