fixes to initialization of TMX when it is used implicitly