Trying to fix connect exceptions