Possible fix for tdInit issue #19

@Hexagon, please check my cc changes.