fix issue when assigning a default connection #332