fix transformer bug