properly handling disconnects - this might even fix an antique bug with duplicate...