A few bugs were fixed, that were related to problems when running tests
on ti modules.