fixed memory leak in population test