Simplify code and actually disable mirror when not needed