True. But Ben Franklin also didn't go around using his advice and axioms to justify his drinking and womanizing.
Ayn Rand was not a saint, and misapplied her own code in her life.
My philosophy, in essence, is the concept of man as a heroic being, with his own happiness as the moral purpose of his life, with productive achievement as his noblest activity, and reason as his only absolute. -- Ayn Rand (*)
Based on this, I don't see how you can say she "misapplied" her code -- indeed, it would appear that her conduct in the affair with Nathaniel Brandon lived up to it. And according to John Galt's Oath, nobody has grounds to complain.