TSRM fixes
Merge pull request #2 from weltling/master

TSRM fixes