bugfix for mask