Fixed an multiple factories issue