fix the last_time bug