Added MNIST rotation and fixed bug.