bug fix to calendar component