fix memory leak in local hub