Fix exit plugin when connecting