bugfix for pruning