fixed factory to correctly handle config strings