Fixed a NPE when re-removing a connector