fix Graphic transform bug: rect gets set too early