Fix db lock

Adds missing close statement after button/text refresh in Calc.