fix stupid bug in affine transformation. Automask for monitor is almost working now