Fix bugs related to timestamp and mustbefresh flag.