add support for tm module and bugfixes (mainly the bug 'an integer is required')