Mirroring fixes.
Merge pull request #733 from jcushman/mirror-fixes2

Mirroring fixes v.2