fix connection control