[transforms] Fixed several bugs