Fixed bug in task start and end date comparison