minor bug fix to calculator