small bugfix for a problem with the TM define script