Fix latency computation