Fixed buggy transform fixing code in _setType