Corrected a memory leak in GenericFactor caused by configurations not being always deleted.