TM compilation error fixes