automod fix, uses TBUtils, other fixes.