mask mode escape sequence fix