Fixed some connect/disconnect issues with the clients