Mask mode bugfix