Fixed filtering by datetime.