fixing start and end date bugs