backport calendar fixes