mask-mode:fix issues with mask stretching.