Fixed error due to uninitialized calendar