fix bug in new factories