Merge in bug fixes for TSMF