Fixed connection removal causing a segfault (lol)