fix connection method