Fixed previous connection bug when editing the key