fixed a bug regarding to mirror-switching
fixed another mirror-regarding bug