fix small bug in creating a calendar