Fix serve memory leak