Fix magnification+rotation bug