Improved connection handling and first connection