Merge "Fix memory operations for history" into ub-calculator-euler