Fixed keep alive timeout
Fixed instability due to incorrect timeouts implementation