Retrieve term ID before minting
Fix module error