Fixed C code for unitrans