fixed some calendar bugs