fixed bug: dragging from the device panel to the tree throws an exception