handle disconnecting hubs and proper lock protection on the hubs variable.