fixed the bug by adding set_TYPE in .cc files