Fixed so factory can accept lists as arguments.