fix transform memory leak