Some tdm fixes