fixing calendar bug