Fix calendar memory leak