Fixed a calculator bug