fixing time update bug.