Update transform.c

Restored previous version.
Transform invoked from C is now working again.