Fixing wrong calendar period