Fixed Gen, but breaks at subset during second loop