Fixed bugs in permute and contract with Intel compiler