Fix calendar bug