ensure disconnect, remove unneeded code