Board Thread:Theories and Speculation/@comment-26388300-20150612203442/@comment-681696-20150612210156

Hashirama and Tobirama were weaker when resurrected the first time so Orochimaru's binding was likely strong enough to control them long enough to eliminate their personalities.

Madara also waited until Kabuto release Edo Tensei before using the counter jutsu which might been nessecary to use the counter jutsu.