possible fix to calendar functions