Fixes in the primitive factory.