Fixed the ConcurrentModificationException that sometimes occured during the autoconnect