Fixed an issue with activities not being included on start and end dates