fixed memory leak cause by singleton.