fixed two bugs in transformations codes