fix mask parser errors.