Fix calculator functionality.