fix calendar bug