Mirroring fixes.

A bunch of random stuff to get mirroring working again -- shouldn't affect anything on prod.