fix memory leak on server delete/disconnect