Fixed bugs reading affine transforms and clearing data