Fixed several bugs in Trans class.