Fix: fix connection was assigned a nil will lead to panic