Fix bug in transform_