Fix affine transform error