calculator bug fix