fixed bugs of calendar