fixed pruning bad mem write