SDGS bug fixed: deletePartitions(part); added for 2 cases (after checkResources() and applyMask())