term_name used before initialised