Fix internal connections not clearing up