fix calendar bugs