Fixed recursive extraction bug