trying to fix connection bug