Fixes to get algorithm running again.