Fix samples after modifying factory