fix the bug of pruning operations