connected flag bugfix