fix tc build errors and code coverage issues