clean up path in tempalte TCb function