bug fix with calculator date handling