Fixes for TC 9 compatibility