Calculation widget is not working correctly