Eliminated a memory leak in some of the factors caused by AD3.