fixing date window overlap issue