Near the end of season eight, Penny is infected by a virus and subsequently saved through the intervention of the spirit of the Staff of Creation. The only thing is, I didn't quite understand what Ruby and the others told the spirit to do. They told him to create a new version of Penny, but there was something in there about how the spirit couldn't destroy her soul and thus this little nuance would force him to save her. And I think Ruby said something about copying the virus as well. It was a bit confusing. I'm not entirely sure whether Penny's soul stayed in her old body and the virus was put in the new one, or if Penny's soul went into her new body and the virus was put in the new one.
What happened?