fix bug in calculating last updated at