- fixed closing/removing ended/invalid connections