Fixing calendar bug