fix bug in today_gen