fix mirror handling