Calculator:fix some small bugs