Fixed the masking for arrays.