fix latency cal err bug