fixed latency bug