Fixed bug in Calendar API introduced in last commit.