Bug fix switch restore mask.