Fixed calculator bug