Adding more connection cleanup code.