added some latency and other fixes