fix disconnect issues