Fixed mirror bugs.

Not so well as planed.