Bug fix to xz -> xy conversion