[v6r12] Fix TransformationAgent

Simple fix to avoid an exception in finalize and double printing when terminating the agent