fixed bug in permutation composition