fixed calculator bug