Fixed bug with overlapping dates