Fix bug where clicking on a component would destroy wires