bug fix for ZigZagConversion