fix bug in transform, add scale