fixed bug in axis swapping