Fixed extraction of subterms