bugfix when the mask was empty