fixed another bug with output when order_by_date is set to 0.