Fixed a typo bug $startDate instead of $endDate