Calendar bug fix