Add Transform tests, bug fix