fixed factory error