small fixes in calc