Fixing calculation when dates were not in selected collection.