fixed memory leak in service