Merge "Fix magnification switch bugs"