ContextPreservingAlgo fixed for dynamic