Fixing the subtree generator module