Created latency time
Corrected gui bugs