fixed the pruning