fixing Length pruning