small fixes to transformer. Still buggy however.
debugging...