fixes connection method