bugfix : crash when mask was created from external plugin