fix extend masks