Fixed a bug that crashed when grouping by hour