Fixing some calendar bugs.
Merge pull request #947 from ngodfraind/master

Fixing some calendar bugs.