minor fixes to the calculator